<?php
ImportClass('json');

$postconfig=isset($_POST)? $_POST : array();

foreach ($postconfig as $key=>$value)
{
    $value  = (is_array($_POST[$key]))? gpc_getStringArray($key) : gpc_getStringPost($key);
    if(strlen($key)<3)return;
    if(is_array($value))
    {
        $value     = FJSON::encode($value);   
    }else
    {
       $value      = replace_pathlocal($value);	   
    }   
    saveConfig($key,$value); 
}
$msg = "Update Config Success !";
$page = "";
page_transfer($msg,$page);
exit();
?>